﻿#include "WinApp.h"


int _Main_(HINSTANCE hInstance, int nCmdShow)
{

    D11::WinApp::State state;
    state.title = L"Hello World";
    state.width = 800;
    state.height = 600;

    D11::WinApp app(state);
    
    if (!app.InitD3DApp(hInstance, nCmdShow))
    {
        LOGI("Cannot init d3d App , Window Failed");
        return 0;
    }
    LOGI("Init Direct11 App Successfully");
    return app.Execute();
}

#ifdef _WINDOWS

int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    return _Main_(hInstance, nCmdShow);
}

#else

int main(char** argv, int argc)
{
    return _Main_(nullptr, SW_SHOWDEFAULT);
};

#endif